#include "gtktypebuiltins.h"
#include "gtktreeview.h"
+#include "gtkbuildable.h"
#include "gtklabel.h"
#include "gtkframe.h"
GtkWidget *state_row;
GtkWidget *state;
+ GtkWidget *buildable_id_row;
+ GtkWidget *buildable_id;
GtkWidget *default_widget_row;
GtkWidget *default_widget;
GtkWidget *default_widget_button;
sl->priv->object = NULL;
}
- if (!GTK_IS_WIDGET (object))
+ if (!GTK_IS_WIDGET (object) && !GTK_IS_BUILDABLE (object))
{
gtk_widget_hide (GTK_WIDGET (sl));
return;
gtk_widget_hide (sl->priv->state_row);
}
+ if (GTK_IS_BUILDABLE (object))
+ {
+ gtk_label_set_text (GTK_LABEL (sl->priv->buildable_id),
+ gtk_buildable_get_name (GTK_BUILDABLE (object)));
+ gtk_widget_show (sl->priv->buildable_id_row);
+ }
+ else
+ {
+ gtk_widget_hide (sl->priv->buildable_id_row);
+ }
+
if (GTK_IS_WINDOW (object))
{
gtk_widget_show (sl->priv->default_widget_row);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/inspector/misc-info.ui");
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, state_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, state);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, buildable_id_row);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, buildable_id);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, default_widget_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, default_widget);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, default_widget_button);
</child>
</object>
</child>
+ <child>
+ <object class="GtkListBoxRow" id="buildable_id_row">
+ <property name="visible">True</property>
+ <property name="activatable">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin">10</property>
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="buildable_id_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Buildable ID</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="buildable_id">
+ <property name="visible">True</property>
+ <property name="selectable">True</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
<object class="GtkListBoxRow" id="default_widget_row">
<property name="visible">True</property>
<property name="mode">horizontal</property>
<widgets>
<widget name="state_label"/>
+ <widget namel="buildable_id_label"/>
<widget name="default_widget_label"/>
<widget name="focus_widget_label"/>
</widgets>